package com.easybuy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.easybuy.dao.AdvDao;
import com.easybuy.entity.Adv;
import com.easybuy.service.AdvService;

@Service("advService")
public class AdvServiceImpl implements AdvService {

	@Autowired
	private AdvDao advDao;

	public List<Adv> getList(int position) {
		return advDao.getList(position);
	}

	public void add(Adv adv) {
		advDao.add(adv);
	}

	public Adv getById(int id) {
		return advDao.getById(id);
	}

	public void update(Adv adv) {
		advDao.update(adv);
	}

	public void delete(int id) {
		advDao.delete(id);
	}

	public List<Adv> getbyPosition(int position) {
		return advDao.getbyPosition(position);
	}

}
